package cn.lzh.service;

import cn.lzh.entity.BookType;
import cn.lzh.mapper.BooktypeMapper;
import cn.lzh.service.BooktypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BooktypeServiceImpl implements BooktypeService {
    @Autowired
    BooktypeMapper booktypeMapper;

    @Override
    public void add(BookType booktype) {
        booktypeMapper.add(booktype);
    }

    @Override
    public void update(BookType booktype) {
      booktypeMapper.update(booktype);
    }

    @Override
    public List<BookType> findAll() {
        return booktypeMapper.findAll();
    }

    @Override
    public BookType findById(int id) {
        return booktypeMapper.findById(id);
    }
}
